//package org.springframework.common;
//
//import org.springframework.beans.Car;
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.config.BeanPostProcessor;
//
///**
// * @Name CustomBeanPostProcessor
// * @Description: 自定义 BeanPostProcessor 处理器
// * 描述信息：Spring 容器的扩展（装饰器模式）机制，实现在 Bean 实例化之后修改或替换 Bean 实例。
// * @Version v1.0.0
// * @Author: lichao
// * @Date: 2024-03-19 20:15:15
// **/
//public class CustomBeanPostProcessor implements BeanPostProcessor {
//    @Override
//    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
//        System.out.println("CustomBeanPostProcessor#postProcessBeforeInitialization(), beanName: " + beanName);
//        if ("car".equals(beanName)) {
//            ((Car) bean).setBrand("比亚迪");
//        }
//        return bean;
//    }
//
//    @Override
//    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
//        System.out.println("CustomBeanPostProcessor#postProcessAfterInitialization(), beanName: " + beanName);
//        return bean;
//    }
//}
//
